package com.lianzhihui.romeex.utils;

import com.lianzhihui.romeex.config.AppConstants;

/**
 * Description:
 * Author: RAMON
 * CreateDate: 2020/11/12 5:47 PM
 * UpdateUser:
 * UpdateDate:
 * UpdateRemark:
 * Version:
 */
public class StringTool {
    /**
     * 截取前两个字符
     *
     * @param str
     * @return
     */
    public static String subHead(String str) {
        if (str.length() < 3) {
            return "";
        }
        if (str.startsWith("ro")) {
            return str.substring(2);
        } else {
            return str;
        }
    }

    /**
     * 添加头部
     *
     * @param str
     * @return
     */
    public static String addHead(String str) {
        return AppConstants.APP_T + str;
    }

}
